package com.wiscamp.ninechapters.accounts.domain.models;

import cube.ddd.domain.Entity;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Collection;

/**
 * 账户
 */
@Data
public class Account implements Entity {
    private static final long serialVersionUID = 1L;

    /**
     * 账户编号
     */
    private long accountId = 0;
    /**
     * 账户类型
     */
    private int accountType = 0;
    /**
     * 用户编号
     */
    private long userId = 0;
    /**
     * 余额
     */
    private BigDecimal balance = new BigDecimal(0);
    /**
     * 是否批次管理
     */
    private boolean batchManagement = false;
    /**
     * 创建时间
     */
    private LocalDateTime createTime;
    /**
     * 变更时间
     */
    private LocalDateTime editTime;

    /**
     * 账户批次列表
     */
    private Collection<AccountBatch> accountBatches = new ArrayList<>();
}